# -*- coding: utf-8 -*-

class Foo:
    def __init__(self, a, b):
        self.a = a
        self.b = b
    @property
    def add(self):
        return self.a + self.b

obj = Foo(3, 5)
print(obj.add)  # 把方法变成属性调用